#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
#
# This file is part of Coruja-scripts
#
# Coruja-scripts is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# Coruja-scripts is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Coruja-scripts.  If not, see <http://www.gnu.org/licenses/>.
#
# Copyright 2011 Grupo Falabrasil - http://www.laps.ufpa.br/falabrasil
#
# Author 2011: Pedro Batista - pedosb@gmail.com

import ConfigParser

import os
import sys

config = ConfigParser.SafeConfigParser()
try:
	config.readfp(open('default.cfg'))
except IOError:
	config.readfp(open(os.path.join(os.path.dirname(sys.argv[0]), 'default.cfg')))
config.read(('user.cfg',
		os.environ.get('DTW_CONFIG') if os.environ.get('DTW_CONFIG') is not None else ''))
